package com.wm.androidmvp.scene

import android.view.View
import android.widget.TextView
import butterknife.BindView
import butterknife.ButterKnife
import com.wm.androidmvp.R
import com.wm.androidmvp.model.MainModel
import com.wm.androidmvp.model.MainModelImpl
import com.wm.androidmvp.presenter.MainPresenter
import com.wm.androidmvp.view.MainView
import com.wm.mvp.base.BaseScene

class MainScene:BaseScene<MainModel,MainView,MainPresenter>(),MainView {

    @BindView(R.id.main_tv)
    lateinit var tv:TextView
    override fun initView(v: View) {
    }

    override fun initData() {
        presenter?.getData()
    }

    override fun getLayoutId(): Int = R.layout.activity_main

    override fun createMode(): MainModel = MainModelImpl()

    override fun createView(): MainView = this

    override fun createPresenter(): MainPresenter = MainPresenter()

    override fun setData(str: String?) {
        tv.text = "Scene：$str"
    }

    override fun showLoadingDialog() {
    }

    override fun dismisLoadingDialog() {
    }


}